#encoding:utf-8
for i in range (1,10):
	for j in range(1,i+1):
		print("{}*{}={}".format(i,j,i*j),end=" ")
	print("")

for m in range (9,0,-1):
	for n in range(1,m+1):
		print("{}*{}={}".format(m,n,m*n),end=" ")
	print("")
for x in range(1,10):
	for k in range(1,10-x):
		print(end=" "*9)
	for y in range(x,0,-1):
		print("{}*{}={:<4}".format(y,x,x*y),end=" ")
	print("")
'''
k=10
h=0
for x in range(1,10):
	for y in range(x,0,-1):
		print(end="    ")
		print("{}*{}={}".format(y,x,x*y),end=" ")
		#print(end="	")
		h=k-x
	print("")
'''
for a in range(9,0,-1):
	for b in range(1,10-a):
		print(end=" "*9)
	for c in range(a,0,-1):
		print("{}*{}={:<4}".format(c,a,a*c),end=" ")
	print("")
